MapperWriteKeyValueRepo

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun set(toSet: Map<FromKey, FromValue>)

Will set as batch toSet data in current repo. Must pass the data which were successfully updated in repo to onNewValue

Link copied to clipboard
open suspend override fun ToKey.toInnerKey(): FromKey
Link copied to clipboard
open suspend override fun ToValue.toInnerValue(): FromValue
Link copied to clipboard
open suspend override fun FromKey.toOutKey(): ToKey
Link copied to clipboard
open suspend override fun FromValue.toOutValue(): ToValue
Link copied to clipboard
open suspend override fun unset(toUnset: List<FromKey>)

Will unset as batch data with keys from toUnset. Must pass the Keys which were successfully removed in repo to onValueRemoved

Link copied to clipboard
open suspend override fun unsetWithValues(toUnset: List<FromValue>)

Will unset as batch data with values from toUnset. Must pass the Keys which were successfully removed in repo to onValueRemoved

Properties

Link copied to clipboard
open override val keyMapper: SimpleSuspendableMapper<FromKey, ToKey>
Link copied to clipboard
open override val onNewValue: Flow<Pair<FromKey, FromValue>>

This flow must emit data each time when data by Key has been changed with set method or in any other way excluding cases of data removing

Link copied to clipboard
open override val onValueRemoved: Flow<FromKey>

This flow must emit data each time when data by Key has been removed with unset/unsetWithValues methods or in any other way

Link copied to clipboard
open override val valueMapper: SimpleSuspendableMapper<FromValue, ToValue>